#include "SMPPReceiptedMessageId.hpp"

using namespace smpp::pdu;

ReceiptedMessageId::ReceiptedMessageId(const CoctetString &nValue):
TLV(TLVtags::TAG_RECEIPTED_MESSAGE_ID,nValue.size()),_Value(nValue){}

ReceiptedMessageId::ReceiptedMessageId(
const ReceiptedMessageId &nReceiptedMessageId):
TLV(nReceiptedMessageId),_Value(nReceiptedMessageId.getValue()){}

bool ReceiptedMessageId::operator ==(
	const ReceiptedMessageId &nReceiptedMessageId) const{
	return (TLV::operator == (nReceiptedMessageId) && 
			_Value == nReceiptedMessageId.getValue());
}

bool ReceiptedMessageId::operator !=(
	const ReceiptedMessageId &nReceiptedMessageId) const{
	return !this->operator == (nReceiptedMessageId);
}

ReceiptedMessageId &ReceiptedMessageId::operator = (
	const ReceiptedMessageId &nReceiptedMessageId){
	if(*this == nReceiptedMessageId)
		return *this;
	TLV::operator = (nReceiptedMessageId);
	_Value = nReceiptedMessageId.getValue();
	return *this;
}

void ReceiptedMessageId::setValue(const CoctetString &nValue){
	_Value = nValue;
}

const CoctetString &ReceiptedMessageId::getValue() const{
	return _Value;
}
